-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added handling of pid error response #686
Conversation
Added some reviewers. I expect we're all busy preparing for SPIE, but hopefully one of the three of us can review this soon. |
Hi @bbixler500, thanks for looking into this. I like your description of the problem here: https://github.com/simonsobs/chwp-discussions/discussions/20#discussioncomment-9610840. Can we add a description like this to the docs of this agent, and maybe a short inline comment in addition? A few requests:
|
Addressed the comments from jack and tested this in daq-dev for satp3. |
this looks fine, but I have a couple of gripes, some of which may be out of scope for this PR... Thank you for adding better error checking, but I don't see any place where these messages are printed on failure. This should probably happen in the Currently I really dislike the structure of the This would benefit a lot from creating a Then you could do better error handling in the responses = []
responses.append(self.send_message("*X01"))
decoded_resp = self.return_messages(responses)[0]
if decoded_resp.message_type == MessageType.FreqMeasure:
return decoded_resp.measure
elif decoded_resp.message_type == MessageType.Error:
print(f"Error reading freq: {decoded_resp.message}")
# Retry or raise exception
... Maybe we save this for a future upgrade, but I think this would make error handling easier, and make the module more human-understandable. |
@jlashner Addressed your suggestions and tested by daq-dev again. |
Thanks for refactoring so quickly! One recommendation when reading the new code is to make |
Merging the latest from |
@BrianJKoopman Do you have any idea why the integration test for test_cryomech_cpa_agent_integration.py takes more than 6 hours and fails? |
Hi @ykyohei. The printout in the CI is a bit misleading, sometimes the next line doesn't print where it's really hanging, so it looks like it's hanging on the cryomech tests, but it's really hanging on the HWP PID integration tests. Running locally I see:
The error in the agent that I'm seeing it crash on is:
EDIT: It is a problem that this doesn't throw an actual error within the testing setup and move on to the next test. I'll try to work on a solution to that. But hopefully this will allow you to fix the error in the meantime. |
Test is fixed and all checks have passed! |
Changes for fixing the tests should be reviewed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks kyohei!
Attempts to fix hwp pid error handling issues
Description
Occasionally the hwp pid controller will read an error value which it does not know how to handle, which will crash the monitoring process. This PR adds handling to this specific error code.
Motivation and Context
Issue described here (link)
How Has This Been Tested?
Briefly ran changes on satp1 hardware. Error rarely occurs, so was unable to verify correct handling explicitly.
Types of changes
Checklist: